home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/perl
- # From: johnw@bahainvs.org (John Wiegley)
-
- open(TEMP, "> /tmp/In.Mail.$$");
- select TEMP;
-
- while( <STDIN> )
- {
- next if( /^From / );
-
- if( /^From:[ \t]+([^\n]*)/ )
- {
- $address = $1;
-
- if( $address =~ /([^\s]+)\s+\([^)]+\)/
- || $address =~ /[^<]+<([^>]+)>/
- || $address =~ /"[^"]+"\s+<([^>]+)>/ )
- {
- $address = $1
- }
- }
-
- print;
- }
-
- close(TEMP);
-
- $now = `date`;
- $" = ' ';
-
- open(CATMAIL, "| /usr/listserv/catmail @ARGV");
- open(TEMP, "/tmp/In.Mail.$$");
-
- print CATMAIL "From $address $now";
- print CATMAIL <TEMP>;
-
- close(TEMP);
- close(CATMAIL);
-
- unlink("/tmp/In.Mail.$$");
-
-